package alvarodelrosal.chat.client.chataction.remote;

import alvarodelrosal.chat.client.modelo.Connection;
import java.util.ArrayList;
import java.util.List;

public class ChatNewChat implements ChatRemoteAction {

    @Override
    public String getName() {
        return "NewChat";
    }

    @Override
    public void doAction(List<String> parameters) {
        String query = "NewChat<:@:>" + parameters.get(0);
        
        Connection.sendToServer(query);
    }

    public List<String> generateParameters(String subject) {
        List<String> parameters = new ArrayList();
        parameters.add(subject);
        
        return parameters;
    }
    
}
